package com.dxy.df.modules.bean.put;

import com.dxy.df.core.model.BasicInput;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;




/**
 * @author biz@dxy.cn
 * @date 2019-10-25 16:23:46
 */
@Setter
@Getter
@ApiModel
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class DfLikePut extends BasicInput   {
	private static final long serialVersionUID = 1L;
	

    @ApiModelProperty(value = "文章id")
	private Integer articleId;

    @ApiModelProperty(value = "状态，0点赞，1踩")
	private Integer likes;


	public static void main(String[] args) {
		System.out.println((0.5 * 50 + 0.3 * 40 + 0.1 * 300) * Math.exp(-0.192 * 20));

		long nd = 1000 * 24 * 60 * 60;
		long nh = 1000 * 60 * 60;
		long nm = 1000 * 60;

		Date now = new Date();
		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		try {
			 /*分钟差*/
			Date fromDate3 = sf.parse("2019-10-26 01:37");
			Date toDate3 = sf.parse("2019-10-26 04:13");
			long from3 = fromDate3.getTime();
			long to3 = toDate3.getTime();
			int minutes = (int) ((to3 - from3) / (1000 * 60));
			System.out.println("两个时间之间的分钟差为：" + minutes);
		} catch (ParseException e) {
			e.printStackTrace();
		}


	}




}
